package jmine.tec.utils.annotation.visitor;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.util.Collection;

/**
 * Visitor para annotations em campos
 * 
 * @author takeshi
 * @param <R> R
 */
public interface FieldAnnotationVisitor<R> {

    /**
     * Verifica se este visitor deve ser chamado para a annotation e campo passados
     * 
     * @param annotation {@link Annotation}
     * @param declaringClass {@link Class}
     * @param field {@link Field}
     * @return boolean
     */
    boolean acceptsFieldAnnotation(Annotation annotation, Class<?> declaringClass, Field field);

    /**
     * @param annotation {@link Annotation}
     * @param declaringClass {@link Class}
     * @param field {@link Field}
     * @return {@link Collection}
     */
    Collection<? extends R> onFieldAnnotation(Annotation annotation, Class<?> declaringClass, Field field);

}
